$(document).ready(function(){
    //load Map

    function initialize() {
        var latlng = new google.maps.LatLng(21.012647,105.817176);
        var settings = {
            zoom: 15,
            center: latlng,
            mapTypeControl: true,
            mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
            navigationControl: true,
            navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},
            mapTypeId: google.maps.MapTypeId.ROADMAP};
        var map = new google.maps.Map(document.getElementById("map_canvas"), settings);
        var contentString = '<div id="contentas">'+
            '<div id="siteNotice">'+
            '</div>'+
            '<h1 id="firstHeading" class="firstHeading">QT MedicalSpa</h1>'+
            '<div id="bodyContent">'+
            '<p></p>'+
            '</div>'+
            '</div>';
        var infowindow = new google.maps.InfoWindow({
            content: contentString
        });

        var companyImage = new google.maps.MarkerImage('images/logo2.png',
            new google.maps.Size(100,50),
            new google.maps.Point(0,0),
            new google.maps.Point(50,50)
        );

        var companyShadow = new google.maps.MarkerImage('images/logo_shadow.png',
            new google.maps.Size(130,50),
            new google.maps.Point(0,0),
            new google.maps.Point(65, 50));

        var companyPos = new google.maps.LatLng(57.0442, 9.9116);

        var companyMarker = new google.maps.Marker({
            position: companyPos,
            map: map,
            icon: companyImage,
            shadow: companyShadow,
            title:"QT MedicalSpa",
            zIndex: 3});
        google.maps.event.addListener(companyMarker, 'click', function() {
            infowindow.open(map,companyMarker);
        });
    }
	//show loading bar
	function showLoader1(){
	}
	//hide loading bar
	function hideLoader1(){
	}
	$("#pagesn .pages li").click(function(){
		//show the loading bar
		showLoader1();
		$("#pagesn .pages li").css({'background-color' : ''});
		$(this).css({'background-color' : '#A5CDFA'});
		$("#resn").load("home/page/" + this.className, hideLoader1);
        
	});
	
	// by default first time this will execute
	$(".1").css({'background-color' : '#A5CDFA'});
	showLoader1();
	$("#resn").load("home/page/1",hideLoader1);

    initialize();
});
$(document).ready(function(){
    //show loading bar
    function showLoader1(){
    }
    //hide loading bar
    function hideLoader1(){
    }
    $(".pageavi a").click(function(){
        //show the loading bar
        showLoader1();
        $("#items2s").load("/page/" + this.className, hideLoader1);
    });

    // by default first time this will execute
    $(".1").css({'background-color' : '#A5CDFA'});
    showLoader1();
    $("#items2s").load("/page/1",hideLoader1);


});

